import request from '@/utils/request'
//咨询
export function Getnews(data) {
	return new Promise((resolve, reject) => {
		request({
			url: '/news/list',
			method: 'get',
			data
		}).then(data => {
			resolve(data)
		}).catch((e) => {
			uni.showToast({
				title: e.msg,
				icon: 'none',
				duration: 2000
			})
			reject(e)
		})
	})
}
//详情
export function GetnewsById(data) {
	return new Promise((resolve, reject) => {
		request({
			url: '/news/getById',
			method: 'get',
			data
		}).then(data => {
			resolve(data)
		}).catch((e) => {
			uni.showToast({
				title: e.msg,
				icon: 'none',
				duration: 2000
			})
			reject(e)
		})
	})
}